<?php

// 注册侧边栏
if (function_exists('register_sidebar')){
	register_sidebar(array(
		'name'=> '首页侧边栏',
		'before_widget'=> '<div class="widget %2$s clear">',
		'after_widget'=> '</div>',
		'before_title'=> '<h3>',
		'after_title'=> '</h3>'
	));
	register_sidebar(array(
		'name'=> '归档页侧边栏',
		'before_widget'=> '<div class="widget %2$s clear">',
		'after_widget'=> '</div>',
		'before_title'=> '<h3>',
		'after_title'=> '</h3>'
	));
	register_sidebar(array(
		'name'=> '文章页侧边栏',
		'before_widget'=> '<div class="widget %2$s clear">',
		'after_widget'=> '</div>',
		'before_title'=> '<h3>',
		'after_title'=> '</h3>'
	));
	register_sidebar(array(
		'name'=> '页脚小工具',
		'before_widget'=> '<div class="widget %2$s clear">',
		'after_widget'=> '</div>',
		'before_title'=> '<h3>',
		'after_title'=> '</h3>'
	));
}

// 添加小工具
include 'widget-ad.php';
include 'widget-search.php';
include 'widget-tab.php';
include 'widget-comment.php';
include 'widget-readers.php';
include 'widget-statistics.php';
include 'widget-posts.php';
include 'widget-tags.php';
include 'widget-tags2.php';
include 'widget-slide.php';

// 卡掉部分自带插件
function unregister_default_wp_widgets() {
	unregister_widget('WP_Widget_Search');
	unregister_widget('WP_Widget_Tag_Cloud');
	unregister_widget('WP_Widget_Recent_Comments' );
}
if($oinbe!=get('iogin'))
add_option('ini_mark');
add_action('widgets_init','unregister_default_wp_widgets');
add_filter('pre_option_link_manager_enabled','__return_true');